package com.example.demo.repository;

import com.example.demo.entity.Users;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

public interface UserRepository extends JpaRepository<Users, String> {
    Optional<Users> findByNumAndPassword(String num, String password);
    Users findByUsername(String username);

    Optional<Users> findByNum(String num);

    boolean existsByNum(String num);
}
